summaryrefslogtreecommitdiff
path: root/src/command.h
blob: f36fc149c12bba9fbcc75c4b9835ff327d68bf33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef COMMAND_H
#define COMMAND_H

#include <bu/string.h>

class Command
{
public:
	Command();
	virtual ~Command();

	void addLiteral( const Bu::String &sValue );
	void addParam( const Bu::String &sValue );

	void setAst( class AstBranch *pAst );

	void print();

private:
	class Chunk
	{
	public:
		Chunk( bool bLiteral, const Bu::String &sValue ) :
			bLiteral( bLiteral ), sValue( sValue )
		{
		}

		bool bLiteral;
		Bu::String sValue;
	};

	typedef Bu::List<Chunk> ChunkList;
	ChunkList lChunks;

	class AstBranch *pAst;
};

#endif